import routeComponentName from '@/config/route-component-name'

const applicationRouter = [
  {
    path: '/application',
    component: () => import('@/layout/index.vue'),
    name: 'application',
    // redirect: '/application/yonyou', //格美淇
    redirect: '/application/connection', //施罗德
    meta: {
      title: '应用中心',
      icon: 'icon-yingyongzhongxin',
    },
    children: [
      {
        path: 'centre',
        component: () => import('@/views/application/index.vue'),
        name: 'centre',
        meta: {
          title: '应用中心',
          keepAlive: true,
          icon: 'icon-yingyongzhongxin',
          componentName: routeComponentName.appCenter.appCenter,
        },
      },
      {
        path: 'centre/app_detail/:id',
        component: () => import('@/views/application/appDetail/index.vue'),
        name: 'appDetail',
        meta: {
          title: '应用详情',
          keepAlive: true,
          componentName: routeComponentName.appCenter.appDetail,
        },
        hidden: true,
      },
      {
        path: 'connection',
        component: () => import('@/views/application/connection/index.vue'),
        name: 'connection',
        meta: {
          title: '星空对接配置',
          keepAlive: true,
          icon: 'Menu',
          componentName: routeComponentName.appCenter.kingdeeXingkongConnectConfig,
        },
        hidden: true,
      },
      {
        path: 'yonyou',
        component: () => import('@/views/application/yonyou/index.vue'),
        name: 'yonyou',
        meta: {
          title: '用友对接配置',
          keepAlive: true,
          icon: 'Menu',
          componentName: routeComponentName.appCenter.kingdeeYongyouConnectConfig,
        },
        hidden: true,
      },
    ],
  },
]

export default [
  {
    path: '/application',
    component: () => import('@/layout/index.vue'),
    name: 'application',
    redirect: '/application/base/data/sync',
    meta: {
      title: '应用中心',
      icon: 'icon-yingyongzhongxin',
    },
    children: [
      {
        path: 'base/data/sync',
        component: () => import('@/views/application/bae-data-sync/index.vue'),
        name: 'baseDataSync',
        meta: {
          title: '基础数据同步',
          keepAlive: true,
          icon: 'Menu',
          componentName: routeComponentName.appCenter.baseDataSync,
        },
        hidden: true,
      },
    ],
  },
]
